home *** CD-ROM | disk | FTP | other *** search
-
- class TTEApplication : public TApplication {
- public:
- virtual pascal void ITEApplication(OSType itsMainFileType);
- virtual pascal struct TDocument *DoMakeDocument(CmdNumber itsCmdNumber);
- virtual pascal struct TCommand *DoMenuCommand(CmdNumber aCmdNumber);
- virtual pascal void PoseModalDialog();
- #ifdef qDebug
- virtual pascal void IdentifySoftware();
- #endif
- };
-
- class TTEDocument;
-
- class TPaletteView : public TView {
-
- // friend class TTEDocument;
-
- public:
- int fIconSelected;
- virtual pascal void IPaletteView(TTEDocument *itsTEDocument);
- virtual pascal struct TCommand *DoMouseCommand(Point *theMouse,
- EventInfo *info, Point *hysteresis);
- pascal void DoHighlightSelection(HLState fromHL, HLState toHL);
- pascal void Draw(Rect *area);
- #ifdef qDebug
- virtual pascal void Fields(pascal void (*DoToField) (StringPtr fieldName,
- Ptr fieldAddr, short fieldType, void *link), void *link);
- #endif
- };
-
-
- class TBox : public TObject {
- public:
- Rect fLocation;
- pascal void IBox(Rect *itsLocation);
- pascal void DrawShape();
- pascal void NeedDiskSpace(long *data);
- pascal void Read(short aRefNum);
- pascal void Write(short aRefNum);
- #ifdef qDebug
- virtual pascal void Fields(pascal void (*DoToField) (StringPtr fieldName,
- Ptr fieldAddr, short fieldType, void *link), void *link);
- #endif
- };
-
-
- class TTextView : public TTEView {
-
- // friend class TTEDocument;
-
- public:
- TTEDocument *fTEDocument;
- TPaletteView *fPaletteView;
- Boolean fUpdated;
- pascal void ITextView(TTEDocument *itsTEDocument);
- pascal Boolean DoIdle(IdlePhase phase);
- pascal struct TCommand *DoKeyCommand(short ch,
- short aKeyCode, EventInfo *info);
- pascal struct TCommand *DoMenuCommand(CmdNumber aCmdNumber);
- pascal void DoSetupMenus ();
- pascal struct TCommand *DoMouseCommand(Point *theMouse,
- EventInfo *info, Point *hysteresis);
- pascal Boolean DoSetCursor(Point localPoint, RgnHandle cursorRgn);
- pascal void Draw(Rect *area);
- #ifdef qDebug
- virtual pascal void Fields(pascal void (*DoToField) (StringPtr fieldName,
- Ptr fieldAddr, short fieldType, void *link), void *link);
- #endif
- };
-
- class TColorCmd : public TCommand {
-
- // friend class TTEDocument;
-
- public:
- TTEDocument *fTEDocument;
- TTextView *fTextView;
- int fOldColorCmd, fNewColorCmd; // menu command numbers
- pascal void IColorCmd(int aCmdNumber, TTEDocument *itsDocument,
- TTextView *itsView);
- pascal void DoIt();
- pascal void RedoIt();
- pascal void UndoIt();
- #ifdef qDebug
- virtual pascal void Fields(pascal void (*DoToField) (StringPtr fieldName,
- Ptr fieldAddr, short fieldType, void *link), void *link);
- #endif
- };
-
-
- class TSketcher : public TCommand {
-
- // friend class TTEDocument;
-
- public:
- TTEDocument *fTEDocument;
- TTextView *fTextView;
- TBox *fBox; // the object being sketched
- Rect fBoxLocation; // size of the Box being sketched
- pascal void ISketcher(TTEDocument *itsDocument, TTextView *itsView);
- pascal struct TCommand *TrackMouse(TrackPhase aTrackPhase,
- VPoint *anchorPoint, VPoint *previousPoint,
- VPoint *nextPoint, Boolean mouseDidMove);
- pascal void DoIt();
- pascal void RedoIt();
- pascal void UndoIt();
- #ifdef qDebug
- virtual pascal void Fields(pascal void (*DoToField) (StringPtr fieldName,
- Ptr fieldAddr, short fieldType, void *link), void *link);
- #endif
- };
-
-
- class TTEDocument : public TDocument {
- public:
- TPaletteView *fPaletteView;
- TTextView *fTextView;
- Handle fTextHdl; // text typed by user
- int fTextColorCmd; // menu command number
- TList *fShapeList; // list of Shapes to be drawn
- pascal void ITEDocument();
- pascal void AddShape(TBox *aBox);
- pascal void DeleteShape();
- pascal void DoMakeWindows();
- pascal void DoMakeViews(Boolean forPrinting);
- pascal void DoNeedDiskSpace(long *dataForkBytes, long *rsrcForkBytes);
- pascal void DoRead(short aRefNum, Boolean rsrcExists, Boolean forPrinting);
- pascal void DoWrite(short aRefNum, Boolean makingCopy);
- pascal void ForEachShapeDo(pascal void (*DoToItem)
- (TObject *item, void *DoToItem_Staticlink),void *DoToItem_Staticlink);
- pascal void Free();
- pascal void SetTextColorCmd(int theColorCmd);
- pascal int TextColorCmd();
- #ifdef qDebug
- virtual pascal void Fields(pascal void (*DoToField) (StringPtr fieldName,
- Ptr fieldAddr, short fieldType, void *link), void *link);
- #endif
- };
-
-
- // --- global definitions ---
-
- typedef pascal void (*DoToObject) (TObject *aObject, void *DoToObject_staticlink);
-
- struct CalcDiskSpaceStruct {
- long myDataForkBytes;
- };
-
- struct DoToRectStruct {
- int myRefNum;
- };
-
- //
- // --- end of declarations ---
- //
-